import { http } from '@/utils/http'
import type { TestDetail, TestResult, TestList, TestPatientResult } from '@/types/healthTest'

export const getTestDetailById = (htId: string) => {
  return http<TestDetail[]>({
    url: `/health/testDetail/getById/` + htId,
  })
}

export const getTestResult = (data: TestDetail[]) => {
  return http<TestResult>({
    method: 'POST',
    url: `/health/testResult/getList/`,
    data,
  })
}

export const getTestResult02 = (data: TestDetail[]) => {
  return http<TestResult>({
    method: 'POST',
    url: `/health/testResult/getList2/`,
    data,
  })
}

export const getAllHealthTest = () => {
  return http<TestList[]>({
    url: `/health/testList/list`,
  })
}

export const getPatientResult = (patientId: string) => {
  return http<TestPatientResult>({
    url: `/health/patientResult/jie/` + patientId,
  })
}
